Skip to content

Comments

feat: Reset paused valve on stop#25

Merged
hostcc merged 2 commits intomainfrom
feat/reset-paused-valve-on-stop
Sep 28, 2025
Merged

feat: Reset paused valve on stop#25
hostcc merged 2 commits intomainfrom
feat/reset-paused-valve-on-stop

Conversation

@hostcc
Copy link
Owner

@hostcc hostcc commented Sep 28, 2025

  • When a controller is stopped (either by pressing corrsponding Shutdown button or when enabling the winter mode) any paused and queued valves are reset. An use case is to shutdown a watering cycle with valves paused, when the cycle should not be running (e.g. started by mistake but paused due to tank being empty).

* When a controller is stopped (either by pressing corrsponding `Shutdown`
  button or when enabling the winter mode) any paused and queued valves are reset.
  An use case is to shutdown a watering cycle with valves paused,
  when the cycle should not be running (e.g. started by mistake but paused due
  to tank being empty).
@hostcc hostcc requested a review from Copilot September 28, 2025 18:49
@hostcc hostcc self-assigned this Sep 28, 2025
@hostcc hostcc added the enhancement New feature or request label Sep 28, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds functionality to reset paused valves when sprinkler controllers are stopped, either through the shutdown buttons or when enabling winter mode. This ensures that any paused and queued valves are properly reset when stopping a watering cycle.

  • Introduces a reusable script template for resetting controllers that both shuts down and resets resume state
  • Replaces direct sprinkler.shutdown calls with the new reset script in button actions
  • Updates winter mode activation to use the new reset functionality for both controllers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
script_reset_controller.yaml New template script that shuts down controller and resets resume state
controllers.yaml Updated shutdown buttons and winter mode to use the new reset script instead of direct shutdown calls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

…shutdown(true)` call,

  which also clears any queued values in the sprinkler controller.
@hostcc hostcc merged commit d77ab7e into main Sep 28, 2025
3 checks passed
@hostcc hostcc deleted the feat/reset-paused-valve-on-stop branch September 28, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant